import axios from '@/libs/axios1.js'
import baseUrl from './index'
let jsonHeaders = {'content-type': 'application/json;charset=UTF-8'}
let video = '/self-study/videoSelfStudy'
// 添加自学视频
export const addStudyVideo = (params) => {
    return axios({
        url: `${video}/add`,
        method: 'post',
        headers: jsonHeaders,
        data:params
    })
}

//修改自学视频
export const modifyStudyVideo = (params) => {
    return axios({
        url: `${video}/modify`,
        method: 'put',
        headers: jsonHeaders,
        data:params
    })
}

//删除自学视频
export const delStudyVideo = (videoId) => {
    return axios({
        url: `${video}/del/${videoId}`,
        method: 'delete',
        headers: jsonHeaders
    })
}

//查询视频列表
export const queryStudyVideo = params => {
    return axios({
        url: `${video}/page`,
        method: 'get',
        headers: jsonHeaders,
        params:params
    })
}